/**
 * @author : cyb1010
 * @date   : 2024-05-30 11:01:54
 * @file   : journey.cpp
 */
#include <bits/stdc++.h>
using namespace std;
#define fo(s) freopen(s ".in", "r", stdin), freopen(s ".out", "w", stdout)
#define fi first
#define se second
typedef double db;
typedef long double ldb;
typedef long long ll;
typedef unsigned long long ull;
void ckmn(int &x, int y) { (x > y) && (x = y); }

int __, n, m, q, et = 1, hd[610], w[310][310], val[310], tot;

int S, T;
struct edge {
    int to, nxt, flw, cst;
    edge() {}
    edge(int _to, int _nxt, int _flw, int _cst)
        : to(_to), nxt(_nxt), flw(_flw), cst(_cst) {}
} e[200010];
void addedge(int x, int y, int flw, int cst) {
    e[++et] = edge(y, hd[x], flw, cst), hd[x] = et;
}
void add(int x, int y, int c) { addedge(x, y, 1, c), addedge(y, x, 0, -c); }

int dis[610], frm[610], fre[610];
bool inq[610];
bool flow() {
    memset(dis, 0x3f, sizeof(dis));
    queue<int> q;
    q.push(0), dis[0] = 0;
    while (!q.empty()) {
        int x = q.front();
        q.pop(), inq[x] = 0;
        for (int i = hd[x]; i; i = e[i].nxt)
            if (e[i].flw && dis[e[i].to] > dis[x] + e[i].cst) {
                dis[e[i].to] = dis[x] + e[i].cst;
                frm[e[i].to] = x, fre[e[i].to] = i;
                if (!inq[e[i].to]) inq[e[i].to] = 1, q.push(e[i].to);
            }
    }
    if (dis[T] == dis[T + 1]) return false;
    for (int i = T; i; i = frm[i]) e[fre[i]].flw--, e[fre[i] ^ 1].flw++;
    return true;
}

int main() {
    fo("journey");
    cin.tie(0)->sync_with_stdio(0);
    cin >> n >> m >> q;
    S = 0, T = n << 1 | 1;
    for (int i = 1; i <= n; i++) add(S, i, 0), add(i + n, T, 0);
    memset(w, 0x3f, sizeof(w));
    for (int i = 1, x, y, z; i <= m; i++) cin >> x >> y >> z, ckmn(w[x][y], z);
    for (int k = 1; k <= n; k++)
        for (int i = 1; i <= n; i++)
            for (int j = 1; j <= n; j++) ckmn(w[i][j], w[i][k] + w[k][j]);
    for (int i = 1; i <= n; i++)
        for (int j = 1; j <= n; j++)
            if (w[i][j] < w[0][0]) add(i, j + n, w[i][j]);
    while (flow()) tot++, val[tot] = val[tot - 1] + dis[T];
    for (int c, ans; q--;) {
        cin >> c, ans = c * n;
        for (int i = 1; i <= tot; i++) ckmn(ans, c * (n - i) + val[i]);
        cout << ans << '\n';
    }
    return 0 ^ __ ^ 0;
}